package svc

import (
	"Junior_two/subject/order/orderapi/internal/config"
	"Junior_two/subject/order/orderrpc/orderrpcclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config      config.Config
	OrderServer orderrpcclient.OrderRpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:      c,
		OrderServer: orderrpcclient.NewOrderRpc(zrpc.MustNewClient(c.OrderServer)),
	}
}
